{% extends "base.html" %}
{% block title %}添加选课{% endblock %}
{% block content %}

<div class="container">
    <h3 class="mt-5">{{ student.username }} 选择课程</h3>
    <form method="POST" class="mt-3">
        <div class="form-group">
            <label for="course_id">选择课程:</label><br><br>
            <select class="form-control" id="course_id" name="course_id" required>
                <option value="未选课">未选课</option>
                {% for course in courses %}
                <option value="{{ course.id }}">{{ course.name }}</option>
                {% endfor %}
            </select>
        </div>
        <br><br>
        <button type="submit" class="btn btn-primary">确认</button>
        <a href="{{ url_for('list_students') }}" class="btn btn-secondary">返回学生列表</a>
    </form>
</div>
    
{% endblock %}
